package com.qf.data.student.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 学生表(Student)表实体类
 *
 * @author makejava
 * @since 2022-11-12 17:00:12
 */
@Data
@Accessors(chain = true)
public class Student implements Serializable {
    //主键
    @TableId(type = IdType.AUTO)
    private Long id;
    //姓名
    @NotBlank(message = "姓名不能为空！")
    private String name;
    //年龄
    @NotNull(message = "年龄不能为空！")
    @Min(value = 16, message = "年龄不能小于{value}")
    @Max(value = 20, message = "年龄不能超过{value}")
    private Integer age;
}

